home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / PROGRAMR / OLE2BOOK.ZIP / CHAP05.ZIP / CHAP05 / SMASHER / MAKEFILE next >
Text File  |  1993-03-28  |  2KB  |  83 lines

  1. #
  2. # MAKEFILE
  3. # Smasher File Manager Extension for Compound Files
  4. #
  5. # Copyright (c)1993 Microsoft Corporation, All Rights Reserved
  6. #
  7. # Kraig Brockschmidt, Software Design Engineer
  8. # Microsoft Systems Developer Relations
  9. #
  10. # Internet  :  kraigb@microsoft.com
  11. # Compuserve:  >INTERNET:kraigb@microsoft.com
  12. #
  13.  
  14. #Add '#' to the next line for 'noisy' operation
  15. !CMDSWITCHES +s
  16.  
  17. #
  18. #Compiler flags
  19. #Use "SET RETAIL=1" from MS-DOS to compile non-debug version.
  20. #
  21. !ifndef RETAIL
  22. CFLAGS  = -c -nologo -Od -AS -Zipe -G2sw -W3
  23. LINK    = /al:16/ONERROR:NOEXE/CO
  24. DEFS    = -DSTRICT -D_WINDLL -DDEBUG
  25. !else
  26. CFLAGS  = -c -nologo -Oat -AS -Zpe -G2sw -W3
  27. LINK    = /al:16/ONERROR:NOEXE
  28. DEFS    = -DSTRICT -D_WINDLL
  29. !endif
  30.  
  31. .SUFFIXES: .h .obj .exe .cpp .res .rc
  32.  
  33. TARGET  = smasher
  34.  
  35. goal:   $(TARGET).dll
  36.  
  37. clean:
  38.     del *.obj
  39.     del *.res
  40.     del *.dll
  41.  
  42.  
  43. LIBS    = libw sdllcew compobj storage
  44. INCLS   = $(TARGET).h wfext.h
  45. OBJS    = $(TARGET).obj
  46. RCFILES = $(TARGET).bmp
  47.  
  48.  
  49. #####
  50.  
  51. .cpp.obj:
  52.     echo +++++++++
  53.     echo Compiling $*.cpp
  54.     cl $(CFLAGS) $(DEFS) $*.cpp
  55.  
  56. .rc.res:
  57.     echo +++++++++
  58.     echo Compiling Resources
  59.     rc -r $(DEFS) $*.rc
  60.  
  61.  
  62. #This rule builds a linker response file on the fly depending on debug flags
  63. $(TARGET).dll : $(OBJS) $(TARGET).res $(TARGET).def
  64.     echo ++++++++++
  65.     echo Linking $@
  66.     echo libentry.obj +                          > $(TARGET).lrf
  67.     echo $(OBJS)                                >> $(TARGET).lrf
  68.  
  69.     echo $(TARGET).dll $(LINK)                  >> $(TARGET).lrf
  70.     echo nul/li                                 >> $(TARGET).lrf
  71.     echo $(LIBS)/NOD/NOE                        >> $(TARGET).lrf
  72.     echo $(TARGET).def                          >> $(TARGET).lrf
  73.  
  74.     link @$(TARGET).lrf
  75.     rc -v $(TARGET).res $(TARGET).dll
  76.     del $(TARGET).lrf
  77.  
  78.  
  79. ##### Dependencies #####
  80.  
  81. $(TARGET).obj : $(TARGET).cpp $(INCLS)
  82. $(TARGET).res : $(TARGET).rc  $(INCLS) $(RCFILES)
  83.